﻿#region Copyright
/* Product of DTL Software
 * Product Name : Support Memmory
 * Author : dinhtienlam.spkt@gmail.com
 * About: Developer of DTL Software
 * Contact : 0966 330 237
 */
#endregion

#region Using Default
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Configuration;
#endregion

#region Using MVCSharp
using Lamdt.LogicLayer;
using Lamdt.MVCSharp.Winforms;
using Lamdt.MVCSharp.Core.Views;
using Lamdt.MVCSharp.Core.Configuration.Views;
#endregion

namespace SupportMemmory
{
    public partial class dtlBaseForm : WinFormView, dtlIBaseView
    {
        #region Documentation
        /// <summary>
        /// Property get controller of view.
        /// </summary> 
        #endregion
        private dtlBaseController<dtlBaseTask, dtlIBaseView> con
        {
            get
            {
                return base.Controller as dtlBaseController<dtlBaseTask, dtlIBaseView>;
            }
        }        

        #region Documentation
        /// <summary>
        /// Constructor of form and set start position of form is CenterScreen.
        /// </summary> 
        #endregion
        public dtlBaseForm()
        {
            InitializeComponent();
            StartPosition = FormStartPosition.CenterScreen;
        }

        public void ChangeLanguage(object sender, EventArgs e)
        {
            SetFromLanguage();
        }

        public virtual void SetFromLanguage()
        { 
            
        }

        public string GetText(string KeyWord)
        {
            return con.GetText(KeyWord);
        }

        #region Documentation
        /// <summary>
        /// Close all controls and release memory.
        /// </summary>
        /// <param name="e"></param> 
        #endregion
        protected override void OnClosed(EventArgs e)
        {
            base.OnClosed(e);
            Dispose();
        }
    }
}
